<!DOCTYPE html>
<html>
<body>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.dumpChildFrames();
    testRunner.waitUntilDone();
    testRunner.dumpBackForwardList();
 }
   
onpageshow = function()
{
    if (sessionStorage.didNav) {
        delete sessionStorage.didNav;
        if (window.testRunner)
            testRunner.notifyDone();
    } else {
        document.getElementById('the-form').submit();
    }
}
   
</script>  

<p>Tests the following sequence of events:</p>
<ol>
  <li>Submit a form via POST to a frame (redirect-to-go-back.pl).</li>
  <li>Form page does a 302 to a static page (top-go-back.html), still within the frame.</li>
  <li>Static page does a top-level navigation to another static page (go-back.html)</li>
  <li>This static page goes back.</li>
</ol>

<p>We should end up showing the top-level page with the first static page inside the frame.</li>

<form id="the-form" method="POST" action="resources/redirect-to-go-back.pl" target="target-frame">
  <input name="the-input" value="input value goes here">
</form>

<iframe name="target-frame" src="about:blank"></iframe>
</body>
</html>
